<template>
  <!-- 编辑 -->
  <EditForm isEdit :initVal="val"></EditForm>
</template>
<script setup name="bannerEdit">
import { getBannerApi } from "../../../api/banner";
import EditForm from "./compoonent/form.vue";
import { useRoute } from "vue-router";
import { ref } from "vue";
const route = useRoute();
// 1.拿到id
const { id } = route.params;
// console.log(route.params);
const val = ref({});
// 2.ajax
getBannerApi(id).then((res) => {
  val.value = res;
});
</script>
